﻿@model  ElingOA6_Admin_DSJCJ.Model.Calendar
@{
    Html.EnableClientValidation();
    Html.EnableUnobtrusiveJavaScript();
}
<script type="text/javascript">


</script>
@using (Html.BeginForm("Save", "Calendar", FormMethod.Post, new { id = "form_query1" }))
{
    @Html.Hidden("FCalendarID", Model.FCalendarID);
    <table cellpadding="0" cellspacing="0" style="width: 100%; height: 285px;">
        <tr>
            <td style="padding-right: 5px;">
                标题:
            </td>
            <td colspan="4" style="width: 100%">
                @Html.DevExpress().TextBox(
                    settings =>
                    {
                        settings.Name = "FTitle";
                        settings.ShowModelErrors = true;
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    }).Bind(Model.FTitle).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="white-space: nowrap; padding-right: 20px;">
                @Html.DevExpress().Label(
                    settings =>
                    {
                        settings.AssociatedControlName = "StartTime";
                        settings.Text = "开始时间:";
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    }).GetHtml()
            </td>
            <td colspan="1">
               @* Html.DevExpress().DateEdit(
                    settings =>
                    {
                        settings.Name = "FBeginDate";
                        settings.Properties.EditFormat = EditFormat.DateTime;
                        settings.ShowModelErrors = true;
                        settings.Properties.EditFormatString = "yyyy-MM-dd HH:mm:ss";
                        settings.Width = System.Web.UI.WebControls.Unit.Pixel(180);
                    }).Bind(Model.FBeginDate).GetHtml()*@
                    <input type="text"   value="@Model.FBeginDate.ToString("yyyy-MM-dd HH:mm")" id="FBeginDate" name="FBeginDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="Wdate" style="width:170px"/>
            </td>
            <td style="white-space: nowrap; padding-right: 2px;" colspan="2">
                <table>
                    <tr>
                        <td style="white-space: nowrap; padding-right: 15px; padding-left: 20px;">
                            @Html.DevExpress().Label(
                    settings =>
                    {
                        settings.AssociatedControlName = "EndTime";
                        settings.Text = "结束时间:";
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    }).GetHtml()
                        </td>
                        <td>
                            @*Html.DevExpress().DateEdit(
                    settings =>
                    {
                        settings.Name = "FEndDate";
                        settings.Properties.EditFormat = EditFormat.DateTime;
                        settings.ShowModelErrors = true;
                        settings.Properties.EditFormatString = "yyyy-MM-dd HH:mm:ss";
                        settings.Width = System.Web.UI.WebControls.Unit.Pixel(180);
                    }).Bind(Model.FEndDate).GetHtml()*@
                    <input type="text"  value="@Model.FEndDate.ToString("yyyy-MM-dd HH:mm")" id="FEndDate" name="FEndDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="Wdate" style="width:170px"/>
                        </td>
                        <td style="padding-left: 30px">
                            @Html.DevExpress().CheckBox(

        settings =>
        {
            settings.Name = "FIsAllDayEvent";
            settings.Text = "全天事件";
            settings.Checked = Model.FIsAllDayEvent == "Y" ? true : false;
            settings.Width = System.Web.UI.WebControls.Unit.Pixel(180);
            settings.Properties.ClientSideEvents.CheckedChanged = "function(s, e){setifcheckedallday(s ,e)}";
        }).GetHtml()
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="white-space: nowrap; padding-right: 20px;">
                @Html.DevExpress().Label(
                    settings =>
                    {
                        settings.AssociatedControlName = "tixin";
                        settings.Text = "提醒:";
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    }).GetHtml()
            </td>
            <td>
                @Html.DevExpress().ComboBox(
                settings =>
                {
                    settings.Name = "rmdcombobox";
                    settings.Properties.TextField = "Text";
                    settings.Properties.ValueField = "Value";
                    settings.Width = System.Web.UI.WebControls.Unit.Pixel(175);

                }).BindList(new List<SelectListItem> { 
                           new SelectListItem { Text = "无", Value = "none" }, 
                           new SelectListItem { Text = "0分钟", Value = "0m" },

                           new SelectListItem { Text = "5分钟", Value = "5m" },
                           new SelectListItem { Text = "10分钟", Value = "10m" },
                           new SelectListItem { Text = "15分钟", Value = "15m" },
                           new SelectListItem { Text = "30分钟", Value = "30m" },
                           new SelectListItem { Text = "1小时", Value = "1h" },
                             new SelectListItem { Text = "3小时", Value = "3h" },
                               new SelectListItem { Text = "5小时", Value = "5h" },
                                 new SelectListItem { Text = "10小时", Value = "10h" },
                                  new SelectListItem { Text = "18小时", Value = "18h" },
                                  new SelectListItem { Text = "1天", Value = "1d" },
                                   new SelectListItem { Text = "2天", Value = "2d" },
                                    new SelectListItem { Text = "3天", Value = "3d" },
                                     new SelectListItem { Text = "5天", Value = "5d" },
                                     new SelectListItem { Text = "10天", Value = "10d"} 
     }).Bind(Model.WakeStr).GetHtml()
            </td>
            <td style="white-space: nowrap; padding-right: 20px;" colspan="2">
                <table>
                    <tr>
                        <td  style="white-space: nowrap; padding-right: 28px; padding-left: 22px;">
                            @Html.DevExpress().Label(
                    settings =>
                    {
                        settings.AssociatedControlName = "yxj";
                        settings.Text = "优先级:";
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    }).GetHtml()
                        </td>
                        <td>
                            @Html.DevExpress().ComboBox(
                settings =>
                {
                    settings.Name = "pricombobox";
                    settings.Properties.TextField = "Text";
                    settings.Properties.ValueField = "Value";
                    settings.Width = System.Web.UI.WebControls.Unit.Pixel(175);

                }).BindList(new List<SelectListItem> { 
                        
                           new SelectListItem { Text = "低", Value = "3" },

                           new SelectListItem { Text = "中", Value = "2" },
                           new SelectListItem { Text = "高", Value = "1" }
                         
     }).Bind(Model.FPri).GetHtml()
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="1">
                @Html.DevExpress().Label(
                    settings =>
                    {
                        settings.AssociatedControlName = "Description";
                        settings.Text = "内容:";
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    }).GetHtml()
            </td>
            <td colspan="3">
                @Html.DevExpress().Memo(
                    settings =>
                    {
                        settings.Name = "FContents";
                        settings.Properties.Rows = 2;
                        settings.ShowModelErrors = true;
                        settings.Height = System.Web.UI.WebControls.Unit.Pixel(100);
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    }).Bind(Model.FContents).GetHtml()
            </td>
        </tr>
    </table>

    <table cellpadding="0" cellspacing="0" style="width: 100%; height: 35px;">
        <tr> 
            
                        <td align="center">
                            @Html.DevExpress().Button(
                                settings =>
                                {
                                    settings.Name = "Apply";
                                    settings.Text = "确定";
                                    settings.Width = System.Web.UI.WebControls.Unit.Pixel(91);
                                    settings.ClientSideEvents.Click = "OnAppointmentFormSave";

                                }).GetHtml()
                        </td>
                        <td align="center">
                            @Html.DevExpress().Button(
                                settings =>
                                {
                                    settings.Name = "Cancel";
                                    settings.Text = "取消";
                                    settings.ClientSideEvents.Click = "function(s, e){ scheduler.AppointmentFormCancel(); }";
                                    settings.Width = System.Web.UI.WebControls.Unit.Pixel(91);
                                }).GetHtml()
                        </td>
                        <td align="center">
                            @Html.DevExpress().Button(
                                settings =>
                                {
                                    settings.Name = "Delete";
                                    settings.Text = "删除";
                                    settings.Width = System.Web.UI.WebControls.Unit.Pixel(91);
                                    settings.ClientVisible = ViewBag.delvisible;
                                        
                                    settings.ClientSideEvents.Click = "function(s, e){ scheduler.AppointmentFormDelete(); }";
                                }).GetHtml()
                        </td>
                    
        </tr>
    </table>
    <table cellpadding="0" cellspacing="0" style="width: 100%;">
        <tr>
            <td style="width: 100%;" align="left">
                @Html.DevExpress().SchedulerStatusInfo(
                    settings =>
                    {
                        settings.Name = "schedulerStatusInfo";
                        settings.Priority = 1;
                        settings.SchedulerName = "scheduler";
                    }).GetHtml()
            </td>
        </tr>
    </table>
}